from time import sleep
from selenium.webdriver.support.wait import WebDriverWait
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions
def test001(self):
    driver = webdriver.Chrome()
    driver.get("http://localhost/ranzhi/www")
    driver.find_element(By.ID, 'account').send_keys('admin')
    sleep(5)
    driver.find_element(By.ID, 'password').send_keys('#123r4')
    sleep(5)
    driver.find_element(By.ID, 'submit').click()
    sleep(5)
    data=driver.find_element(By.CSS_SELECTOR,'.bootbox-body').txt
    assert data=='登录失败,请检查您的成员名或者密码是否填写正确.','运行失败'
    print(driver.title)
    
    driver.close()
    driver.quit()
    
if __name__ == '__main__':
    test001()
    
